#include "../terra-ge.h"
#include <math.h>
#include "light.h"


using namespace TerraGE;

Light::Light(float tx, float ty, float tz, float tra, float tr, float tg, float tb, int tp) {
    x = tx; y = ty; z = tz;
    range = tra;
    r = tr; g = tg; b = tb;
    type = tp;
    ambience = 0.2;
    strength = 1.0;
}

void Light::Update(float timestep) {

}

void Light::Normalize() {
    float d=sqrt((x * x) + (y * y) + (z * z));
    x/=d;
    y/=d;
    z/=d;
}
